<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>学生体温系统后台</title>
    <link rel="stylesheet" href="assets/layui/css/layui.css">
</head>
<style type="text/css">
    .container {
        width: 420px;
        height: 220px;
        min-height: 220px;
        max-height: 220px;
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        margin: auto;
        padding: 20px;
        z-index: 130;
        border-radius: 8px;
        background-color: #fff;
        box-shadow: 0 3px 18px rgba(100, 0, 0, .5);
        font-size: 16px;
    }


    .layui-input {
        border-radius: 5px;
        width: 300px;
        height: 40px;
        font-size: 15px;
    }

    .layui-form-item {
        margin-left: -20px;
    }

    #logoid {
        margin-top: -16px;
        padding-left: 150px;
        padding-bottom: 15px;
    }

    .layui-btn {
        margin-left: -50px;
        border-radius: 5px;
        width: 350px;
        height: 40px;
        font-size: 15px;
    }

    .verity {
        width: 120px;
    }

    .font-set {
        font-size: 13px;
        text-decoration: none;
        margin-left: 120px;
    }

    a:hover {
        text-decoration: underline;
    }

</style>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">学生体温系统后台</div>
        <!-- 头部区域（可配合layui已有的水平导航） -->
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img src="http://t.cn/RCzsdCq" class="layui-nav-img"> <span id="uname">
                </span> </a>
                <dl class="layui-nav-child">
                    <dd>
                        <a href="">基本资料</a>
                    </dd>
                    <dd>
                        <a href="">安全设置</a>
                    </dd>
                </dl>
            </li>
            <li class="layui-nav-item">
                <a href="/api/v1/logout">退了</a>
            </li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">学生体温信息管理</a>
                    <dl class="layui-nav-child">
                        <dd>
                            <a href="studentlist.html">学生体温列表</a>
                        </dd>
                    </dl>
                </li>

            </ul>
        </div>
    </div>

    <div class="layui-body">
        <iframe id="iframeMain" src="./userpassword.html" style="width: 100%"; height="100%";></iframe>
          </div>


</div>
<script type="text/javascript" src="assets/layui/layui.js"></script>
<script type="text/javascript" src="assets/jquery.min.js"></script>
<script>
    layui.use(['form', 'layedit', 'laydate'], function () {
        var form = layui.form
            , layer = layui.layer
            , layedit = layui.layedit
            , laydate = layui.laydate;


    });
    //JavaScript代码区域
    layui.use('element', function () {
        var element = layui.element;

    });
    $.ajax({
        type: "post",
        contentType: "application/x-www-form-urlencoded",
        url: "/api/v1/user/getuserinfo",
        data: {},
        dataType: "json",
        success: function (data) {

            if (data.resultTypeEnum == 200) {
                document.getElementById("uname").innerHTML = data.message.userName
            } else {
                layer.msg(data.message, {icon: 2});
                window.location.href = "login.html"
            }

        }
    })


    $(document).ready(function(){
        $("dd>a").click(function (e) {
            e.preventDefault();
            $("#iframeMain").attr("src",$(this).attr("href"));
        });
    });
</script>
</body>

</html>